Using the Table Definition wizard
When a
Table Declaration
has been added to the
Control File or the
Data Transformation script file and you save the script, a new file is created. This file is saved with the name you specified for the script file in the Table Declaration. The Table Definition wizard is accessed from the
Scripts
tab.
First open the file that contains your Table Declaration (either the Control File or the Data Transformation file) and select the table you want to define. Click the
Table Definition button.
If you want to edit an existing definition, double-click the text in the script display area of the screen on the right.
Full Table Name
Specify the full table name in the format [Database].[Newtable].
Key Name
Used as a key for updates.
Number of Fields
Click the + (plus) or - (minus) sign to increment or decrement the number of fields required.
Fields
Field Name |
If there is no name already, enter a meaningful name in the field. |
Type |
Data type, for example, text, integer, real (for information on limits and constraints of data types, see
Data type - Limits and Constraints in the Database Reference Library). |
Offset |
Specifies the sequence of the fields in the table. |
Width |
Specifies the exact width of the field. |
Format |
Select an option from the drop-down menu. The Format menu is not available for the INTEGER, UINTEGER, UNICODE, UUNICODE, BIGINT and UBIGINT data types. |
Default |
Specify a default value to be displayed if the field is left blank. |
Decode file |
When an array field format has been selected, you can select an associated Decode file from the drop-down list. This file should be saved in the
Decodes folder along with any other type of decode file.
The decode file must contain the correctly formatted decode strings in the format specified below.
"[No of Decodes]|[Segment Value]|[Decode value]|[Segment Value]|[Decode Value]..."
Note: |
You should also provide a mapping for NULL values if you wish these to persist when specifying a Remap. Failure to do this will mean that valid data with NULL values will be lost. |
(For more information on decoding array fields see
Array Fields)
The value of the
Offset field is different for flat and delimited file types. Use the
Set Fixed Offsets and
Set Ordinal Offsets buttons at the bottom of the screen to specify the values.
|
Insert |
Select a record sequence number from the left-most column to enter a new row in the table. |
Delete |
Select the record sequence number from the left-most column of the record to be deleted . |
Set Fixed Offsets |
For fixed length records this option specifies the start position of each field in the table. |
Set Ordinal Offsets |
For delimited records this option specifies the sequential location of each record in the table.
Enter the width of each record then click either
Set Ordinal Offsets for delimited record types or
Set Fixed Offsets for flat record types; the system will automatically enter the appropriate offset value.
|
On completion, click
OK
to return to the
Scripts
tab. Click the
Save button.
|
|